package com.study.subscriber;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Created by andys on 2017/12/10.
 */
public class SecondListener implements MessageListener {
    @Override
    public void onMessage(Message message) {
        try {
            System.out.println("SecondSubscriber"+((TextMessage)message).getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
